import axios from '@/http/api'

export const version = '/api'

export const lawMenu = () => {
  return axios({
    url: `${version}/law/law_menu`,
    method: 'get'
  })
}

export const uploadUrl = () => {
  return `${version}/compare/compare_regulations`
}

// 重新对比，只需要compare_id就行了
export const restartCompare = (data) => {
  return axios({
    url: `${version}/compare/retry_compare`,
    method: 'post',
    data
  })
}

export const compareStatus = (id) => {
  return axios({
    url: `${version}/compare/status/${id}`,
    method: 'get'
  })
}

export const compareHistory = (params) => {
  return axios({
    url: `${version}/compare/his`,
    method: 'get',
    params
  })
}

export const compareResult = (id) => {
  return axios({
    url: `${version}/compare/result/${id}`,
    method: 'get'
  })
}
